<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>校园应用系统</title>
    <link rel="stylesheet" th:href="@{/layui/css/css.css}">
    <style>
        .layui-table-view .layui-form-checkbox[lay-skin=primary] i {
            margin-top:8px;
        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">校园应用系统</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <!-- 移动端显示 -->
            <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                <i class="layui-icon layui-icon-spread-left"></i>
            </li>

            <li class="layui-nav-item layui-hide-xs"><a href="">nav 1</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">nav 2</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">nav 3</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">nav groups</a>
                <dl class="layui-nav-child">
                    <dd><a href="">menu 11</a></dd>
                    <dd><a href="">menu 22</a></dd>
                    <dd><a href="">menu 33</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img src="/images/1.png" class="layui-nav-img">
                    student
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">个人资料</a></dd>
                    <dd><a href="">设置</a></dd>
                    <dd><a th:href="@{/loginHtml}">退出系统</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-more-vertical"></i>
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">学生管理</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/student}">学生信息管理</a></dd>
                        <dd><a href="javascript:;">学生详细信息管理</a></dd>
                        <dd><a href="javascript:;">举报管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">班级管理</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/teacherJsp}">班级信息管理</a></dd>
                        <dd><a href="javascript:;">班级详细信息管理</a></dd>
                        <dd><a href="">举报管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">课程信息管理</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/curriculumHtml}">课程信息管理</a></dd>
                        <dd><a href="javascript:;">课程详细信息管理</a></dd>
                        <dd><a href="">举报管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">宿舍管理</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/dormitoryHtml}">宿舍信息管理</a></dd>
                        <dd><a href="javascript:;">宿舍详细信息管理</a></dd>
                        <dd><a href="">举报管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">教室管理</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/classroomJsp}">教室信息管理</a></dd>
                        <dd><a href="javascript:;">教室详细信息管理</a></dd>
                        <dd><a href="">举报管理</a></dd>
                    </dl>
                </li> <li class="layui-nav-item">
                <a href="javascript:;">购物管理</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/findGoods}">购物信息管理</a></dd>
                    <dd><a href="javascript:;">购物详细信息管理</a></dd>
                    <dd><a href="">举报管理</a></dd>
                </dl>
            </li>
                <li class="layui-nav-item"><a href="javascript:;">修改密码</a></li>
                <li class="layui-nav-item"><a th:href="@{/loginJsp}">退出系统</a></li>
            </ul>
        </div>
    </div>
    <input id="gradeId" hidden th:value="${stu.gradeGradeId}"/>
    <input id="gradeName" hidden th:value="${stu.gradeGradeName}"/>
    <input id="dormitoryName" hidden th:value="${stu.dormitoryDormitoryName}"/>
    <div class="layui-body">



        <!-- 内容主体区域 -->
        <div style="width: 1000px;height: 800px;margin: 0 auto;margin-top: 109px;overflow: hidden">
            <div style="font-size: 30px;margin-top: 40px">
                <input id="stuNum" name="stuNum" hidden th:value="${stu.stuNum}"/>
                <input id="stuId" name="stuId" hidden th:value="${stu.stuId}"/>
                学生姓名
                <input id="stuName" disabled th:value="${session.re.getStuName()}"style="margin-left: 50px;border:none;background: none"/>
                <div class="layui-btn-container"  style="margin-left: 405px;margin-top: -38px">
                    <button type="button" onclick="button_stuName()" class="layui-btn"><i class="layui-icon"></i></button>
                </div>
            </div><br/>


            <div style="font-size: 30px;width: 800px;margin-top: 10px;overflow:hidden;">
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width: 200px;margin-left: -155px">性别</label>
                        <div class="layui-input-inline">
                            <select name="sex" id="sex"  lay-filter="sex" style="width: 100px;margin-left: 103px">
                                <option th:selected="'男' eq ${session.re.getSex()}">男</option>
                                <option th:selected="'女' eq ${session.re.getSex()}">女</option>
                            </select>
                        </div>
                    </div>
                <div class="layui-btn-container"  style="margin-left: 405px;margin-top: -52px">
                    <button type="button" onclick="button_sex()" class="layui-btn"><i class="layui-icon"></i></button>
                </div>
            </div>
           <br/>
            <div style="font-size: 30px">
                证件号码
                <input id="idNum" disabled th:value="${session.re.getIdNum()}"style="margin-left: 50px ;margin-top-20px ; border:none;background: none"/>
                <div class="layui-btn-container" style="margin-left: 405px;margin-top: -38px">
                    <button type="button" onclick="button_idNum()" class="layui-btn"><i class="layui-icon"></i></button>
                </div>
            </div><br/>
            <div style="font-size: 30px">
                手机号
                <input id="mobile" disabled th:value="${session.re.getMobile()}"style="margin-left: 80px ;border:none;background: none"/>
                <div class="layui-btn-container" style="margin-left: 405px;margin-top: -38px">
                    <button type="button" onclick="button_mobile()" class="layui-btn"><i class="layui-icon"></i></button>
                </div>
            </div><br/>
            <div style="font-size: 30px">
                电子邮箱
                <input id="email" disabled th:value="${session.re.getEmail()}"style="margin-left: 50px;border:none;background: none"/>
                <div class="layui-btn-container" style="margin-left: 405px;margin-top: -38px">
                    <button type="button" onclick="button_email()" class="layui-btn"><i class="layui-icon"></i></button>
                </div>
            </div><br/>
            <div style="font-size: 30px;width: 1200px;margin-left: -331px">
                <form class="layui-form">
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width: 300px;margin-left: 77px">籍贯</label>
                        <div style="margin-left: 100px" class="layui-input-inline">
                            <select  name="province"  id="province"  class="layui-select" lay-filter="province">
                                <option  value=""></option>
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="city"  id="city"  class="layui-select" lay-filter="city" >
                                <option   value=""></option>
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="area"  id="area"  class="layui-select"  lay-filter="areas">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <input  type="text" hidden th:value="${session.re.getProvinceid()}" id="provincesIdh">
                    <input  type="text" hidden th:value="${session.re.getCitiesId()}"  id="citiesIdh">
                    <input  type="text" hidden th:value="${session.re.getAreasId()}" id="areaidh">
        </form>
                <div class="layui-btn-container" style="margin-left: 1108px;margin-top: -53px">
                    <button type="button" onclick="button_address()" class="layui-btn"><i class="layui-icon"></i></button>
                </div>
            </div><br/>
                <img src="/images/1.png" style="width: 300px;height: 283px;margin-left: 646px;margin-top: -519px;border:none;background: none">
        </div>
        <div>
                <button class="layui-btn" onclick="gradeFind()" style="margin-top: -440px;margin-left: 410px">
                    班级名称：<span th:text="${session.re.getGradeGradeName()}"></span>
                </button>
                <button class="layui-btn" onclick="dormitoryFind()" style="margin-top: -440px;margin-left: 110px">
                    宿舍名称：<span th:text="${session.re.getDormitoryDormitoryName()}"></span>
                </button>
                <button class="layui-btn" onclick="trimester()" style="margin-top: -440px;margin-left: 110px">
                    课程表<span></span>
                </button>
        </div>
    </div>
    <div class="layui-footer">
        <!-- 底部固定区域 -->
        校园应用系统
    </div>
</div>
<script th:src="@{/layui/layui.js}"></script>
<script th:src="@{/js/jquery-1.8.3.js}"></script>
<script th:src="@{/thymeleaf/gradeSelone.js}"></script>
<script type="text/javascript">

    // 使用es6的padStart()方法来补0
    function getYMDHMS (timestamp) {
        let time = new Date(timestamp)
        let year = time.getFullYear()
        const month = (time.getMonth() + 1).toString().padStart(2, '0')
        const date = (time.getDate()).toString().padStart(2, '0')
        const hours = (time.getHours()).toString().padStart(2, '0')
        const minute = (time.getMinutes()).toString().padStart(2, '0')
        const second = (time.getSeconds()).toString().padStart(2, '0')

        return year + '-' + month + '-' + date + ' ' + hours + ':' + minute + ':' + second;
    }




    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function(othis){
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            ,menuRight: function(){
                layer.open({
                    type: 1
                    ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    ,area: ['260px', '100%']
                    ,offset: 'rt' //右上角
                    ,anim: 5
                    ,shadeClose: true
                });
            }
        });

    });

    layui.config({
        version: '1623988781494' //为了更新 js 缓存，可忽略
    });
    layui.use('form', function(){
        var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
        //……

        //如果你的 HTML 是动态生成的，自动渲染就会失效
        //因此你需要在相应的地方，执行下述方法来进行渲染

        form.render('select');
    });
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#istBirthday' //指定元素
        });
    });

</script>
</body>
</html>
